<template>
  <h3>Son</h3>
  <p>{{ count }}</p>
  <p>{{ msg }}</p>
  <button @click="update">更新</button>
</template>

<script lang="ts">
export default {
  name: "Son",
  props: {
    count: {
      type: Number,
      required: true,
    },
    msg: {
      type: String,
      required: true,
    },
  },
  emits: ['update:msg'],
  methods: {
    update() {
      this.$emit('update:msg', this.msg + '~')
    }
  }
};
</script>

<style></style>
